[CHAT-645] Ensure Faithfulness evaluation sends all retrieved sources in the correct format#1124
Open
davidgisbey wants to merge 2 commits into
Open
[CHAT-645] Ensure Faithfulness evaluation sends all retrieved sources in the correct format#1124davidgisbey wants to merge 2 commits into
davidgisbey wants to merge 2 commits into
Conversation
Previously, we've only been sending the used sources to the faithfulness evaluation, which it out of line with the evaluation repo. Part of what we want to evaluate is whether the model is correctly identifying which sources are relevant, so we should be sending all retrieved sources.
d25c224 to
6c43f17
Compare
6c43f17 to
37b2971
Compare
37b2971 to
5a66d7d
Compare
langenk
reviewed
May 21, 2026
5a66d7d to
850a6e6
Compare
We were sending the plain content of the chunk to the LLM which means that the LLM isn't actually getting the full context in the sources. The reason for this is that when we use the plain_content method on the chunk, it strips out inline links. This updates the code to use the same format as the evaluation repo which sends the html content of the chunk to the LLM.
850a6e6 to
f62c24b
Compare
langenk
approved these changes
May 21, 2026
Contributor
langenk
left a comment
There was a problem hiding this comment.
Great, looks good to me now. :)
kevindew
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
There are a couple of issues Nick identified in our Faithfulness evaluation:
#plain_contentmethod. This strips out the html from the content, including the inline links.I've updated the evaluation to send all the sources that we send to the structured answer comp llm call and updated the chunk content to mirror the implementation in the evaluation repo.
Jira ticket
https://gdsgovukagents.atlassian.net/jira/software/c/projects/CHAT/boards/269?label=Backend_Dev&selectedIssue=CHAT-645